package com.api.order;

import com.st.entity.Order;
import com.st.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient("st-order")
@RequestMapping("order1")
public interface IOrderClient {
    //添加订单
    @RequestMapping("/addOrder")
    public Result addOrder(@RequestBody Order order);
    //删除订单
    @RequestMapping("/delOrder")
    public Result delOrder(@RequestParam("id") String id);
    //查询订单
    @RequestMapping("/searchOrder")
    public List<Order> searchOrder(@RequestParam("userId") Integer userId);
}
